widget-factory: Make the About dialog actually transient
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 6 Nov 2013 17:50:31 +0000 (12:50 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 6 Nov 2013 17:50:40 +0000 (12:50 -0500)
It's an app action, not a window action.

demos/widget-factory/widget-factory.c

index df301e732aac216320ae79c9ad5c6340c0645e14..ba12b7ede2b8badae8222724e185b0c5b256310b 100644 (file)
@@ -55,14 +55,14 @@ activate_about (GSimpleAction *action,
                 GVariant      *parameter,
                 gpointer       user_data)
 {
-  GtkWidget *window = user_data;
+  GtkApplication *app = user_data;
   const gchar *authors[] = {
     "Andrea Cimitan",
     "Cosimo Cecchi",
     NULL
   };
 
-  gtk_show_about_dialog (GTK_WINDOW (window),
+  gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
                          "program-name", "GTK+ Widget Factory",
                          "version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
                                                      PACKAGE_VERSION,